package com.no1.dao;

import com.no1.utils.DBHelper;

import java.util.ArrayList;
import java.util.List;

public class AdminDao {
    //管理员登录
    public boolean login(String username,String password){
        String sql = "select * from admin where adminname = ? and adminpwd = ?";
        List<String> params = new ArrayList<>();
        params.add(username);
        params.add(password);
        return DBHelper.executeQuery(sql,params).size()>0;

    }
}
